package com.ant.backstage.facade.model;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@Accessors(chain = true)
public class Authentication implements Serializable {

    public static String LOGICAL_OR ="OR";
    public static String LOGICAL_AND ="AND";
    public static String AUTH_TYPE_ANON ="anon";
    public static String AUTH_TYPE_AUTHC ="authc";
    public static String AUTH_TYPE_PREMS ="prems";
    public static String AUTH_TYPE_ROLES ="roles";

    private String url; //接口路径
    private String urlPrefix;
    private String urlSuffix;
    private List<String> type; //请求类型 验证放行
    private String permissionLogical ;
    private List<String> permission;
    private String roleLogical;
    private List<String> role;


   /* Shiro的认证注解处理是有内定的处理顺序的，如果有个多个注解的话，前面的通过了会继续检查后面的，若不通过则直接返回，处理顺序依次为（与实际声明顺序无关）：

    RequiresRoles
    RequiresPermissions
    RequiresAuthentication
    RequiresUser
    RequiresGuest
    你同时声明了RequiresRoles和RequiresPermissions，那就要求拥有此角色的同时还得拥有相应的权限。
    */


}
